<?php
/**
 * 描述
 * Created by Paco
 * Date: 2018/10/19 Time: 12:09
 */

namespace App\Http\Request\Order;


use App\Http\Request\Store;

class RuleStore extends Store
{
    public function rules()
    {
        $data = [
            'title' => 'required',
            'basic_price' => 'required|integer',
            'house_price' => 'required|integer',
            'car_price' => 'required|integer',
            'social_security_price' => 'required|integer',
            'insurance_price' => 'required|integer',
            'is_default' => 'required|integer',
        ];

        $method = strtoupper($this->method());

        if ($method == 'PUT') {
            $data['rule_id'] = 'required|integer';
        }

        return $data;
    }
}